package com.team11.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.team11.server.pojo.MScore;
import com.team11.server.pojo.dto.MScoreDetails;
import com.team11.server.pojo.dto.MScoreList;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author pjc
 * @since 2021-07-08
 */
public interface MScoreMapper extends BaseMapper<MScore> {

    /**
     * 获取个人评分
     *
     * @param page
     * @param pName
     * @param kcName
     * @return
     */
    IPage<MScoreList> getMScoreList(IPage<MScoreList> page, @Param("pName") String pName,
                                    @Param("kcName") String kcName);

    /**
     * 根据mId获取个人综合得分详情
     *
     * @param page
     * @param mId
     * @return
     */
    IPage<MScoreDetails> getMScoreDetails(IPage<MScoreDetails> page, @Param("mId") Integer mId,
                                          @Param("type") Integer type);

    /**
     * 根据mId获取个人信息
     *
     * @param mId
     * @return
     */
    Map<String, Object> getStudentDetails(Integer mId);

}
